function MusicObject(b, a) {
    this.mobj = new Audio();
    this.mobj.src = b;
    this.enabled = true;
    if (a) {
        this.mobj.loop = a
    }
}
MusicObject.prototype.setEabled = function(b) {
    this.enabled = b;
    try {
        if (this.mobj.isplayed) {
            this.mobj.pause()
        }
    } catch (a) {
        console.error("音乐停止播放错误!")
    }
}
;
MusicObject.prototype.play = function() {
    try {
        this.mobj.play()
    } catch (a) {
        console.error("音乐播放错误!")
    }
}
;
MusicObject.prototype.pause = function() {
    try {
        this.mobj.pause()
    } catch (a) {
        console.error("音乐停止播放错误!")
    }
}
;
MusicObject.prototype.replay = function() {
    try {
        if (this.mobj.isplayed) {
            this.mobj.currentTime = 0
        }
        this.mobj.play()
    } catch (a) {
        console.error("音乐重复播放错误!");
        this.mobj.play()
    }
}